package rpcclient

import "cloud_worm/util/proto/urpc"

type WeaponEvent struct {
	AgentId 		string
	AgentIP 		string
	TaskId 			string
	WeaponId 		int

	NeedAgain		bool

	tryCount        int
}

func (w *WeaponEvent) GetTryCount() int {
	return w.tryCount
}

func (w *WeaponEvent) AddTryCount()  {
	w.tryCount++
	return
}

func (w *WeaponEvent) GetMethodName() string {
	return "WeaponEvent.EventPost"
}

func (w *WeaponEvent) GetArgs() interface{} {
	return &urpc.WpEventPostArgs{
		AgentId: w.AgentId,
		AgentIP: w.AgentIP,
		TaskId: w.TaskId,
		WeaponId: w.WeaponId,
	}
}

func (w *WeaponEvent) GetReply() interface{} {
	return &urpc.WpEventPostReply{}
}

func (w *WeaponEvent) IsNeedAgain() bool {
	return w.NeedAgain
}
